{% extends "news/base.html" %}


{% block title_block %}
    <title>用户概况</title>
{% endblock %}

{% block css_block %}
    <link rel="stylesheet" type="text/css" href="../../static/news/css/jquery.pagination.css">
{% endblock %}

{% block script_block %}
    <script type="text/javascript" src="../../static/news/js/jquery.pagination.min.js"></script>
    <script type="text/javascript" src="../../static/news/js/user_follow.js"></script>
    <script type="text/javascript" src="../../static/news/js/page_control.js"></script>
{% endblock %}

{% block content_blcok %}
    <div class="user_menu_con fl">
        <div class="user_center_pic">
            <img {% if author.avatar_url %} src="{{ author.avatar_url }}" {% else %}
                                            src="../../static/news/images/user_pic.png" {% endif %} alt="用户图片">
        </div>
        <div class="user_center_name">{{ author.nick_name }}</div>

        <ul class="other_detail">
            <li>性 别：{% if author.gender == "WOMAN" %}女{% else %}男{% endif %}</li>
            <li>签 名：{{ author.signature }}</li>
        </ul>

        <div class="focus_other">
            <a href="javascript:;" class="focus" style="display: {% if is_followed %}none{% else %}inline-block{% endif %}"
               data-userid="{{ author.id }}">关注</a>
            <a href="javascript:;" class="focused"
               style="display: {% if is_followed %}inline-block{% else %}none{% endif %}"
               data-userid="{{ author.id }}"><span class="out">已关注</span><span class="over">取消关注</span></a>
        </div>

    </div>

    <div class="user_con fr">
        <div class="other_collect">
            <h3>他的文章</h3>
            <ul class="article_list">
                {% for news in data.news_list %}
                    <li><a href="/news/{{ news.id }}">{{ news.title }}</a><span>{{ news.create_time }}</span></li>

                {% endfor %}

            </ul>

            <div id="pagination" class="page" cur_page="{{ data.cur_page }}" total_page="{{ data.total_page }}" source="{{ url_for("user.other") }}"></div>
        </div>

    </div>
{% endblock %}

{% block rank_block %}
{% endblock %}